###########################################
# Simple Makefile for HIDAPI
#
# Alan Ott
# Signal 11 Software
# 2010-06-01
#
# plus Simple Makefile for beepBgone utility
###########################################

all: beepBgone

CC       ?= gcc
CFLAGS   ?= -Wall -g

COBJS     = hid-libusb.o ../beepBgone/beepBgone.o
OBJS      = $(COBJS)
LIBS      = `pkg-config libusb-1.0 libudev --libs`
INCLUDES ?= -I../hidapi `pkg-config libusb-1.0 --cflags`

beepBgone: $(OBJS)
	$(CC) $(CFLAGS) $(INCLUDES) $(LDFLAGS) $^ $(LIBS) -o $@
	strip $@

$(COBJS): %.o: %.c
	$(CC) $(CFLAGS) -c $(INCLUDES) $< -o $@

clean:
	rm -f $(OBJS) beepBgone

.PHONY: clean

